//
//  KSGetOrderListModel.swift
//  Supermarket
//
//  Created by Black_Crystal on 2017/9/26.
//  Copyright © 2017年 kushao. All rights reserved.
//

import UIKit
import HandyJSON

// 内购单列表
class KSGetOrderListModel: KSBaseModel {
    var data: KSGetOrderListDataModel?
    required init() {}
}

class KSGetOrderListDataModel: HandyJSON {
    var list: [KSGetOrderListDataListModel]?
    var order_state_list: [KSGetOrderListStateListModel]?
    var director_list: [KSGetOrderListDirectorListModel]?
    var storate_list: [KSGetOrderListStorateListModel]?
    var page: Int?                                                  // 当前页
    var page_size: Int?                                             // 每页多少条
    var total: Int?                                                 // 总条数
    var total_page: Int?                                            // 总页数
    required init() {}
}

class KSGetOrderListDataListModel: HandyJSON {
    var id: Int = 0                                                 // 订单id
    var order_number: String?                                       // 订单号（内购单id）
    var picking_id: Int?                                            // 拣货单id
    var dispatching_id: Int?                                        // 配送单id
    var storage_id: Int?                                            // 仓库id
    var storage_name: String?                                       // 仓库名字
    var buyer_id: Int?                                              // 买家id
    var add_time: String = ""                                       // 下单时间
    var picking_time: String?                                       // 拣货时间
    var dispatching_time: String?                                   // 配送时间时间
    var up_car_time: String?                                        // 装车时间
    var operate_name: String?                                       // 负责人
    var order_amount: Int = 0                                       // 订单总价
    var order_state: Int = 0                                        // 订单状态
    var receive_time: String?                                       // 到货时间
    var delivery_box_ids: String?                                   // 配送箱id
    var goods_count: Int = 0                                        // 商品数量
    var name: String?                                               // 收货人姓名
    var mobile: String?                                             // 收货人手机号
    var user_area_info: String?                                     // 收货地址
    var delivery_box_list: [String]?                                // 配送箱列表 例 [ “PSX11”, “PSX12”, “PSX13” ]
    var operate_list: [KSGetOrderListDataListOperateListModel]?     // 可操作列表
    
    required init() {}
}

class KSGetOrderListDataListOperateListModel: HandyJSON {
    var key: Int?
    var value: String?
    required init() {}
}

class KSGetOrderListStateListModel: HandyJSON {
    var key: Int?
    var value: String?
    required init() {}
}

class KSGetOrderListDirectorListModel: HandyJSON {
    var operate_id: String?
    var operate_name: String?
    required init() {}
}

class KSGetOrderListStorateListModel: HandyJSON {
    var id: Int?                                                    // 仓库id
    var name: String?                                               // 仓库名
    required init() {}
}
